﻿<div class="branches-node">
    @if (BranchesActivity.IsCollapse)
    {
        <ActivityNode Activity="BranchesActivity"
                      AddActivityClicked="AddActivityClicked"
                      CollapseActionClicked="CollapseBranches" />
    }
    else
    {
        if (WorkflowMode != WorkflowMode.Outline)
        {
            <div class="node-box" />
        }
        <ActivityNode Activity="BranchesActivity"
                      VisibleAddAction="VisibleAddAction"
                      AddActivityClicked="AddBranchClicked"
                      CollapseActionClicked="CollapseBranches" />
        <div class="branches">
            @foreach (var branch in BranchesActivity.Branches)
            {
                <div class="@GetBranchNodeClassNames(branch)">
                    <SequenceNode @key="branch" Sequence="branch" />
                </div>
            }
        </div>
        <div class="branch-line">
            <div class="v-line"></div>
            @if (!IsReadOnly)
            {
                <NodeAction CssClass="add-activity-action" Tooltip="添加活动..." IconName="Actions_AddCircled" Click="AddActivityClicked" />
            }
        </div>
    }
</div>